|
|
|
|
|
|
|
In the module, modWorkflow, your developers need the following declarations: |
|
|
|
|
|
|
|
|
Enum eProcess
DoProcess1
End Enum |
|
|
|
|
|
|
|
|
Enum eRole
WorkerRole = 1
ManagerRole
End Enum |
|
|
|
|
|
|
|
|
Enum eTasks
Task1 = 1
Task2
Task3
Task4
Task5
Task6
End Enum |
|
|
|
|
|
|
|
|
Global theAccountTransactionsGroup As _ AccountTransactionsGroup
Global the AccountAdministrationsGroup As _ AccountAdministrationGroup |
|
|
|
|
|
|
|
|
When doing steps five and six, you explain to the developers that they should define module-level variables in each Role class and initialize them in their respective Class_Initialize events. The code would look as follows: |
|
|
|
|
|
|
|
|
For BankTellerRole:
Private mvarAllForms As New Collection 'local copy
mvarAllForms.Add frmDeposit, CStr(eTasks.Task1)
mvarAllForms.Add frmWithdraw, CStr(eTasks.Task2)
mvarAllForms.Add frmCashDepositRecord, CStr(eTasks.Task3)
mvarAllForms.Add frmCancelTransaction, CStr(eTasks.Task4)
mvarAllForms.Add frmCheckAccountStatus, CStr(eTasks.Task5)
For RegularAccountManagerRole:
Private mvarAllForms As New Collection 'local copy
mvarAllForms.Add frmDeposit, CStr(eTasks.Task1)
mvarAllForms.Add frmWithdraw, CStr(eTasks.Task2)
mvarAllForms.Add frmCashDepositRecord, CStr(eTasks.Task3)
mvarAllForms.Add frmCancelTransaction, CStr(eTasks.Task4)
mvarAllForms.Add frmCheckAccountStatus, CStr(eTasks.Task5)
mvarAllForms.Add frmOpenAccount, CStr(eTasks.Task6) |
|
|
|
|
|